import React from 'react'
import { Router, Route, browserHistory, IndexRoute } from 'react-router'
import App from './../components/App'
import SchedulingM from './../components/SchedulingM'
import BarberM from './../components/BarberM'
import StoreM from './../components/StoreM'
import OrderM from './../components/OrderM'
import OrderInfo from './../components/OrderInfo'
import ServiceM from './../components/ServiceM'
import BannerM from './../components/BannerM'
import CustomerM from './../components/CustomerM'
import AdministratorM from './../components/AdministratorM'
import Areamanager from './../components/Areamanager'

import StatisticsM from './../components/StatisticsM'
import IncomeTable from './../components/IncomeTable'
import FootfallTable from './../components/FootfallTable'
import MonthDataTable from './../components/MonthDataTable'
import TodayDataTable from './../components/TodayDataTable'
import TodayDataTable2 from './../components/TodayDataTable2'
import SerDayDataTable from './../components/SerDayDataTable'
import SerMonthDataTable from './../components/SerMonthDataTable'
import DepositMonSumTable from './../components/DepositMonSumTable'
import DepositDailySumTable from './../components/DepositDailySumTable'
import SerMonthForType from './../components/SerMonthForType'
import SerDayForType from './../components/SerDayForType'
import SerMonEvaluation from './../components/SerMonEvaluation'
import SerAllEvaluation from './../components/SerAllEvaluation'
import ShopCommission from './../components/ShopCommission'
import CommissionSum from './../components/CommissionSum'
import WithdrawRecord from './../components/WithdrawRecord'

import GlobalM from './../components/GlobalM'
import StoreEditor from '../components/StoreEditor'
import AdminEditor from './../components/AdminEditor'
import AreamanagerEditor from './../components/AreamanagerEditor'
import AreamanagerEditorShop from './../components/AreamanagerEditorShop'
import AddBarber from './../components/AddBarber'

import PointM from './../components/PointM'
import PointMRecord from './../components/PointMRecord'
import WalletM from './../components/WalletM'
import WalletRecord from './../components/WalletRecord'

import PrototypeServiceM from './../components/PrototypeServiceM'
import PrototypeServiceEditor from './../components/PrototypeServiceEditor'
import ShopServiceEditor from '../components/ShopServiceEditor'
import ShopServiceM from '../components/ShopServiceM'
import BarberServiceM from '../components/BarberServiceM'

import Coupon from '../components/Coupon'
import CouponEditor from '../components/CouponEditor'

import MallIndex from '../components/MallIndex'
import MallProductTypeM from '../components/MallProductTypeM'
import MallProductTypeEditor from '../components/MallProductTypeEditor'
import MallProductsM from '../components/MallProductsM'
import MallProductsEditor from '../components/MallProductsEditor'
import MallOrderM from '../components/MallOrderM'
import MallOrderEditor from '../components/MallOrderEditor'
import MallStoreM from '../components/MallStoreM'
import MallStoreEditor from '../components/MallStoreEditor'
import MallStatisticsM from '../components/MallStatisticsM'
import MallMember from '../components/MallMember'
import MallMemberEditor from '../components/MallMemberEditor'

import MallIncomeTable from '../components/MallIncomeTable'
import MallMonthIncomeTable from '../components/MallMonthIncomeTable'


import SalaryM from '../components/SalaryM'
import AssistantM from '../components/AssistantM'
import WorkloadInput from '../components/WorkloadInput'
import WorkloadTable from '../components/WorkloadTable'
import WorkloadM from '../components/WorkloadM'
import WorkloadTodayTable from '../components/WorkloadTodayTable'
import WorkloadMCheck from '../components/WorkloadMCheck'
import AssistantInput from '../components/AssistantInput'
//import SalaryGParamSet from '../components/SalaryGParamSet' 疑似废弃
import PerformanceForDay from '../components/PerformanceForDay'
import PerformanceForMonth from '../components/PerformanceForMonth'

import MallCoupon from '../components/MallCoupon'
import MallCouponEditor from '../components/MallCouponEditor'

import Commission from '../components/Commission'
import DrivingSchool from '../components/DrivingSchool'
import DrivingSchoolMInput from '../components/DrivingSchoolMInput'

//分销
import Distribution  from '../components/Distribution'




//import Login from './../components/Login'
import {DynPath} from './../publicAPI/publicAPI'

module.exports = (
  <div>
    <Route path={DynPath("/Map")}  component={TodayDataTable2}/>
    <Route path={DynPath('/')} component={App}>
      <IndexRoute component={SchedulingM}/>
        <Route path={DynPath("/SchedulingM/:id")}  component={SchedulingM}/>
      <Route path={DynPath("/BarberM")}  component={BarberM}/>
       <Route path={DynPath("/BarberM/AddBarber")}  component={AddBarber}/>
       <Route path={DynPath("/BarberM/AddBarber/:id")}  component={AddBarber}/>
      <Route path={DynPath("/StoreM")}  component={StoreM}/>
        <Route path={DynPath("/StoreM/StoreEditor")}  component={StoreEditor}/>
        <Route path={DynPath("/StoreM/StoreEditor/:id")}  component={StoreEditor}/>

      <Route path={DynPath("/OrderM")}  component={OrderM}/>
      <Route path={DynPath("/OrderM/:id")}  component={OrderInfo}/>

      <Route path={DynPath("/ServiceM")}  component={ServiceM}/>
      <Route path={DynPath("/BannerM")}  component={BannerM}/>
      <Route path={DynPath("/CustomerM")}  component={CustomerM}/>
      <Route path={DynPath("/AdministratorM")}  component={AdministratorM}/>
        <Route path={DynPath("/AdministratorM/AdminEditor")}  component={AdminEditor}/>
        <Route path={DynPath("/AdministratorM/AdminEditor/:id")}  component={AdminEditor}/>
      <Route path={DynPath("/Areamanager")}  component={Areamanager}/>
        <Route path={DynPath("/Areamanager/AreamanagerEditor")}  component={AreamanagerEditor}/>
        <Route path={DynPath("/Areamanager/AreamanagerEditor/:id")}  component={AreamanagerEditor}/>
        <Route path={DynPath("/Areamanager/AreamanagerEditorShop/:id")}  component={AreamanagerEditorShop}/>
      <Route path={DynPath("/StatisticsM")}  component={StatisticsM}>
        <Route path={DynPath("/StatisticsM/IncomeTable")}  component={IncomeTable}/>
        <Route path={DynPath("/StatisticsM/FootfallTable")}  component={FootfallTable}/>
        <Route path={DynPath("/StatisticsM/MonthDataTable")}  component={MonthDataTable}/>
        <Route path={DynPath("/StatisticsM/TodayDataTable")}  component={TodayDataTable}/>
        <Route path={DynPath("/StatisticsM/SerDayDataTable")}  component={SerDayDataTable}/>
        <Route path={DynPath("/StatisticsM/SerMonthDataTable")}  component={SerMonthDataTable}/>
        <Route path={DynPath("/StatisticsM/DepositMonSumTable")}  component={DepositMonSumTable}/>
        <Route path={DynPath("/StatisticsM/DepositDailySumTable")}  component={DepositDailySumTable}/>
        <Route path={DynPath("/StatisticsM/SerMonthForType")}  component={SerMonthForType}/>
        <Route path={DynPath("/StatisticsM/SerDayForType")}  component={SerDayForType}/>
        <Route path={DynPath("/StatisticsM/SerMonEvaluation")}  component={SerMonEvaluation}/>
        <Route path={DynPath("/StatisticsM/SerAllEvaluation")}  component={SerAllEvaluation}/>
        <Route path={DynPath("/StatisticsM/ShopCommission")}  component={ShopCommission}/>
        <Route path={DynPath("/StatisticsM/CommissionSum")}  component={CommissionSum}/>
      </Route>
      <Route path={DynPath("/GlobalM")}  component={GlobalM}/>

      <Route path={DynPath("/PointM")}  component={PointM}/>
      <Route path={DynPath("/PointM/:id")}  component={PointMRecord}/>
      <Route path={DynPath("/WalletM")}  component={WalletM}/>
      <Route path={DynPath("/WalletM/:id")}  component={WalletRecord}/>

      <Route path={DynPath("/PrototypeServiceM")}  component={PrototypeServiceM}/>
      <Route path={DynPath("/PrototypeServiceM/PrototypeServiceEditor")}  component={PrototypeServiceEditor}/>
      <Route path={DynPath("/PrototypeServiceM/PrototypeServiceEditor:preview/:id")}  component={PrototypeServiceEditor}/>
      <Route path={DynPath("/PrototypeServiceM/PrototypeServiceEditor/:id")}  component={PrototypeServiceEditor}/>

      <Route path={DynPath("/ShopServiceM")}  component={ShopServiceM}/>
      <Route path={DynPath("/ShopServiceM:id")}  component={ShopServiceM}/>
      <Route path={DynPath("/ShopServiceM/:ShopId")}  component={ShopServiceEditor}/>
      <Route path={DynPath("/ShopServiceM/ShopServiceEditor")}  component={ShopServiceEditor}/>
      <Route path={DynPath("/ShopServiceM/ShopServiceEditor:preview/:id")}  component={ShopServiceEditor}/>
      <Route path={DynPath("/ShopServiceM/ShopServiceEditor/:id")}  component={ShopServiceEditor}/>

      <Route path={DynPath("/BarberServiceM")}  component={BarberServiceM}/>

      <Route path={DynPath("/Coupon")}  component={Coupon}/>
      <Route path={DynPath("/Coupon/CouponEditor")}  component={CouponEditor}/>
      <Route path={DynPath("/Coupon/CouponEditor/:id")}  component={CouponEditor}/>

      <Route path={DynPath("/MallIndex")}  component={MallIndex}/>
      <Route path={DynPath("/MallProductTypeM")}  component={MallProductTypeM}/>
      <Route path={DynPath("/MallProductTypeM/MallProductTypeEditor")}  component={MallProductTypeEditor}/>
      <Route path={DynPath("/MallProductTypeM/MallProductTypeEditor/:id")}  component={MallProductTypeEditor}/>
      <Route path={DynPath("/MallProductsM")}  component={MallProductsM}/>
      <Route path={DynPath("/MallProductsM/MallProductsEditor")}  component={MallProductsEditor}/>
      <Route path={DynPath("/MallProductsM/MallProductsEditor/:id")}  component={MallProductsEditor}/>
      <Route path={DynPath("/MallOrderM")}  component={MallOrderM}/>
      <Route path={DynPath("/MallOrderM/MallOrderEditor")}  component={MallOrderEditor}/>
      <Route path={DynPath("/MallStoreM")}  component={MallStoreM}/>
      <Route path={DynPath("/MallStoreM/MallStoreEditor")}  component={MallStoreEditor}/>
      <Route path={DynPath("/MallStoreM/MallStoreEditor/:id")}  component={MallStoreEditor}/>

      <Route path={DynPath("/MallStatisticsM")}  component={MallStatisticsM} >
        <Route path={DynPath("/MallStatisticsM/MallIncomeTable")}  component={MallIncomeTable}/>
        <Route path={DynPath("/MallStatisticsM/MallMonthIncomeTable")}  component={MallMonthIncomeTable}/>
      </Route>

      <Route path={DynPath("/MallMember")}  component={MallMember}/>
      <Route path={DynPath("/MallMember/MallMemberEditor")}  component={MallMemberEditor}/>
      <Route path={DynPath("/MallMember/MallMemberEditor/:id")}  component={MallMemberEditor}/>
      <Route path={DynPath("/MallCoupon")}  component={MallCoupon}/>
      <Route path={DynPath("/MallCoupon/MallCouponEditor")}  component={MallCouponEditor}/>
      <Route path={DynPath("/MallCoupon/MallCouponEditor/:id")}  component={MallCouponEditor}/>

      <Route path={DynPath("/SalaryM")}  component={SalaryM} >
        <Route path={DynPath("/SalaryM/WorkloadInput")}  component={WorkloadInput}/>
        <Route path={DynPath("/SalaryM/WorkloadM/:id")}  component={WorkloadM}/>
        <Route path={DynPath("/SalaryM/WorkloadTable")}  component={WorkloadTable}/>
        <Route path={DynPath("/SalaryM/WorkloadTodayTable")}  component={WorkloadTodayTable}/>
        <Route path={DynPath("/SalaryM/WorkloadMCheck/:id")}  component={WorkloadMCheck}/>
        {/*<Route path={DynPath("/SalaryM/SalaryGParamSet")}  component={SalaryGParamSet}/>*/}
        <Route path={DynPath("/SalaryM/AssistantM")}  component={AssistantM}/>
        <Route path={DynPath("/SalaryM/AssistantInput")}  component={AssistantInput}/>
        <Route path={DynPath("/SalaryM/AssistantInput/:id")}  component={AssistantInput}/>
        <Route path={DynPath("/SalaryM/PerformanceForDay")}  component={PerformanceForDay}/>
        <Route path={DynPath("/SalaryM/PerformanceForMonth")}  component={PerformanceForMonth}/>
      </Route>
      <Route path={DynPath("/Commission")}  component={Commission}/>
      <Route path={DynPath("/WithdrawRecord")}  component={WithdrawRecord}/>
      <Route path={DynPath("/Distribution")}  component={Distribution}/>
      <Route path={DynPath("/DrivingSchool")}  component={DrivingSchool}/>
      <Route path={DynPath("/DrivingSchoolMInput")}  component={DrivingSchoolMInput}/>
    </Route>
  </div>
);

function dynPath(route) {
  return
}
